<div class="clearfix" id="color-{{$item['id']}}"><!-- start style-list -->
	<div class="style-list">
		<div class="content" >
			<div style="text-align:center;margin:0 0;">
			<?PHP 
				if($item['coverimg']){
					echo $this->Html->image('/img/grey.gif', array('class'=>'lazy','data-src'=>$item['coverimg'], 'title'=>$item['name'],'style'=>'max-width:100%'));
				}
			?>
			</div>
			<ul style="margin:0 0;padding:0 0;list-style: none;text-align:center;" class="clearfix">
<?php
$colors =  explode("\r\n",$item['colors']);
foreach($colors as $c) {
	$cts = explode(';',$c);
	if(count($cts) == 2) {
		echo '<li class="color-swatch" title="<strong>'.$cts[0].'</strong><br/>'.$cts[1].'" data-html="true" data-container="body" data-toggle="tooltip" style="background-color:'.$cts[0].'"></li>';
	}
	else{
		echo '<li class="color-swatch" title="'.$c.'"  data-container="body" data-toggle="tooltip" style="background-color:'.$c.'"></li>';
	}
}
?>
			 </ul>
		</div>
		<div class="tools clearfix">
			 <p style="font-weight:normal;font-size: 16px;text-align: left;color: #EF7060;">{{$item['name']}}</p>
			 
			 {{if $data_tags[$item['id']]}}
					<p style="margin: 5px 0 0;">
					{{loop $data_tags[$item['id']] $tid}}
						<a class="label label-info" href="/color-plans?tag_id={{$tid}}" target="_blank">{{$all_tags[$tid]}}</a> &nbsp;
					{{/loop}}
					</p>
				{{elseif $item_all['Tag']}}
					<p style="margin: 5px 0 0;">
					{{loop $item_all['Tag'] $tag}}
						<a class="label label-info" href="/color-plans?tag_id={{$tag['id']}}" target="_blank">{{$tag['name']}}</a> &nbsp;
					{{/loop}}
					</p>
				{{/if}}
			 
			 <div style="position:absolute;bottom:20px;right:10px;text-align:right;">
			 	{{if $fovarited_list && $favor_id = array_search($item['id'],$fovarited_list)}}

					<a href="javascript:void(0)" style="color: #EF7060;" data-toggle="tooltip" data-container="body" data-placement="top"  class="btn-favorite btn-red pull-right" data-model="Color" data-id="{{$item['id']}}" title="点击取消收藏" ><i class="fa fa-heart"></i>  <span style="font-size:13px;line-height:24px;">{{__('Favorited')}}(<span class="ui-stats-num" id="Stats-Color-{{$item['id']}}-favor_nums">{{$item['favor_nums']}}</span>)</span></a>

					<a class="btn-fav-refresh btn-red pull-right" style="margin:0 10px;color: #EF7060;" href="javascript:;"
data-url="{{$this->Html->url('/favorites/refresh/'.$favor_id)}}" onclick="return refreshfavorite(this);"><i class="fa fa-arrow-up" data-toggle="tooltip" data-container="body" data-placement="top" title="这个经常用，点击移到收藏列表最前面"></i>
					</a>
									
				{{else}}
					<a href="javascript:void(0)" style="color: #EF7060;" data-toggle="tooltip" data-container="body" data-placement="top"  class="btn-favorite btn-red  pull-right" data-model="Color" data-id="{{$item['id']}}" title="收藏配色方案" ><i class="fa fa-heart-o"></i> <span style="font-size:13px;line-height:24px;">{{__('Favorite')}}(<span class="ui-stats-num" id="Stats-Color-{{$item['id']}}-favor_nums">{{$item['favor_nums']}}</span>)</span></a>
				{{/if}}
			</div>	
			{{if !empty($_SESSION['Auth']['Staff']) }}			
	    	<div>
	    		<a class="btn btn-primary btn-xs" href="{{Router::url('/manage/admin/'.$category_control_name.'/edit/'.$item['id'])}}" target="_blank">{{__('Edit')}}</a>
	    		&nbsp;
	    		<a class="btn btn-primary btn-xs" onclick="if(confirm('{{lang('are_you_sure_to_delete')}}')){ajaxAction(ADMIN_BASEURL+'/admin/{{$category_control_name}}/delete/{{$item['id']}}');}" href="javascript:void(0)">{{__('Delete')}}</a>

	    	</div>
			{{/if}}   
		</div>
	</div>	
</div>